const express =require('express') 
const path = require('path')
const fs =require('fs')
const app =express()  

//设置以public为根的路径，去查找东西。
app.use(express.static("public"))

app.get("/index",(req,res)=>{
    let url = path.join(__dirname,'views','index.html');
    let connet = fs.readFileSync(url,"utf-8");
    res.send(connet)
})

app.listen(3000,()=>{
    console.log('3000端口已启动！！！');
})